package com.itheima.date;

import java.util.Date;

public class Demo04 {

    public static void main(String[] args) {
        Date date = new Date(2021,10,13,10,10,10);
        System.out.println(date.getYear());//1900开始算起
        System.out.println(date.getMonth());
        System.out.println(date.getDate());
        System.out.println(date.getDay());
        System.out.println(date.getHours());
        System.out.println(date.getMinutes());
        System.out.println(date.getSeconds());

        System.out.println(date);

        Date date1 = new Date();
        System.out.println(date1.getMonth());
        date1.setYear(-200);
        date1.setMonth(11);
        date1.setDate(11);
        date1.setHours(10);
        date1.setMinutes(10);
        date1.setSeconds(10);
        System.out.println(date1);
    }
}
